<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/include/page.jsp"%>
<c:set value="${requestScope.response.data.list }" var="list"/>
<!DOCTYPE html>
<html lang="en">
	<head>
		<title>首页 - 美妆产品销售系统</title>
		<%@ include file="/common/include/head_title.jsp"%>
	</head>
	<body>
		<jsp:include page="/header"/>
		<div id="carouselBlk">
			<%-- <div id="myCarousel" class="carousel slide">
				<div class="carousel-inner">
					<div class="item active">
						<div class="container">
							<a href="${rootPath}//register"><img style="width: 100%"
								src="${rootPath}/common/resource/themes/images/carousel/1.png" alt="special offers" /></a>
							<div class="carousel-caption">
								<h4>Second Thumbnail label</h4>
								<p>Cras justo odio, dapibus ac facilisis in, egestas eget
									quam. Donec id elit non mi porta gravida at eget metus. Nullam
									id dolor id nibh ultricies vehicula ut id elit.</p>
							</div>
						</div>
					</div>
					<div class="item">
						<div class="container">
							<a href="${rootPath}//register"><img style="width: 100%"
								src="${rootPath}/common/resource/themes/images/carousel/2.png" alt="" /></a>
							<div class="carousel-caption">
								<h4>Second Thumbnail label</h4>
								<p>Cras justo odio, dapibus ac facilisis in, egestas eget
									quam. Donec id elit non mi porta gravida at eget metus. Nullam
									id dolor id nibh ultricies vehicula ut id elit.</p>
							</div>
						</div>
					</div>
					<div class="item">
						<div class="container">
							<a href="${rootPath}//register"><img
								src="${rootPath}/common/resource/themes/images/carousel/3.png" alt="" /></a>
							<div class="carousel-caption">
								<h4>Second Thumbnail label</h4>
								<p>Cras justo odio, dapibus ac facilisis in, egestas eget
									quam. Donec id elit non mi porta gravida at eget metus. Nullam
									id dolor id nibh ultricies vehicula ut id elit.</p>
							</div>
	
						</div>
					</div>
					<div class="item">
						<div class="container">
							<a href="${rootPath}//register"><img
								src="${rootPath}/common/resource/themes/images/carousel/4.png" alt="" /></a>
							<div class="carousel-caption">
								<h4>Second Thumbnail label</h4>
								<p>Cras justo odio, dapibus ac facilisis in, egestas eget
									quam. Donec id elit non mi porta gravida at eget metus. Nullam
									id dolor id nibh ultricies vehicula ut id elit.</p>
							</div>
	
						</div>
					</div>
					<div class="item">
						<div class="container">
							<a href="${rootPath}//register"><img
								src="${rootPath}/common/resource/themes/images/carousel/5.png" alt="" /></a>
							<div class="carousel-caption">
								<h4>Second Thumbnail label</h4>
								<p>Cras justo odio, dapibus ac facilisis in, egestas eget
									quam. Donec id elit non mi porta gravida at eget metus. Nullam
									id dolor id nibh ultricies vehicula ut id elit.</p>
							</div>
						</div>
					</div>
					<div class="item">
						<div class="container">
							<a href="${rootPath}//register"><img
								src="${rootPath}/common/resource/themes/images/carousel/6.png" alt="" /></a>
							<div class="carousel-caption">
								<h4>Second Thumbnail label</h4>
								<p>Cras justo odio, dapibus ac facilisis in, egestas eget
									quam. Donec id elit non mi porta gravida at eget metus. Nullam
									id dolor id nibh ultricies vehicula ut id elit.</p>
							</div>
						</div>
					</div>
				</div>
				<a class="left carousel-control" href="#myCarousel" data-slide="prev">&lsaquo;</a>
				<a class="right carousel-control" href="#myCarousel"
					data-slide="next">&rsaquo;</a>
			</div>
		</div> --%>
		<div id="mainBody">
			<div class="container">
				<div class="row">
					<%@ include file="/common/include/leftBar.jsp"%>
					<div class="span9">
						<h4>最热商品</h4>
						<ul class="thumbnails">
							<c:forEach items="${list }" var="listTemp" varStatus="stat">
								<li class="span3">
										<div class="thumbnail">
											<a href="${rootPath }//goodsInfo?id=${listTemp.id}" target="_blank" title="${listTemp.title }">
												<c:choose>
													<c:when test="${listTemp.listImg != null && listTemp.listImg != '' }">
														<a href="${rootPath }//goodsInfo?id=${listTemp.id}" target="_blank">
															<img alt="" src="${rootPath}${listTemp.listImg }" width="160" height="160">
														</a>
													</c:when>
													<c:otherwise>
														<img alt="" src="${rootPath }/img/no_pic.png" width="160" height="160">
													</c:otherwise>
												</c:choose>
											</a>
											<div class="caption">
												<h5 title="${listTemp.title }">
													<a href="${rootPath }//goodsInfo?id=${listTemp.id}" target="_blank" title="${listTemp.title }">
														${fn:substring(listTemp.title,0,subStrLen) }
													</a>
												</h5>
												<p title="${listTemp.brief }">${fn:substring(listTemp.brief,0,subStrLen) }</p>
												<h4 style="text-align: center">
													<a class="btn" href="${rootPath }//goodsInfo?id=${listTemp.id}" target="_blank" title="${listTemp.title }">
														<i class="icon-zoom-in"></i>
													</a>
													<a class="btn" href="#" onclick="return addCart('${listTemp.id}','1')">
														添加 <i class="icon-shopping-cart"></i>
													</a> <a class="btn btn-primary" href="#">${listTemp.price }</a>
												</h4>
											</div>
										</div>
									</li>
							</c:forEach>
						</ul>
					</div>
				</div>
			</div>
		</div>
		<%@ include file="/common/include/head_footer.jsp"%>
	</body>
</html>